
/*
 * Copyright 2002-2017 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2017原作者。
 *
 *根据Apache许可证2.0版（“许可证”）获得许可；
 *除非符合许可证，否则不得使用此文件。
 *您可以在以下地址获取许可证副本：
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，软件
 *根据许可证分发的内容是按“原样”分发的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限和
 *许可证下的限制。
 */

package org.springframework.beans.factory;

/**
 * Callback that allows a bean to be aware of the bean
 * {@link ClassLoader class loader}; that is, the class loader used by the
 * present bean factory to load bean classes.
 *
 * <p>This is mainly intended to be implemented by framework classes which
 * have to pick up application classes by name despite themselves potentially
 * being loaded from a shared class loader.
 *
 * <p>For a list of all bean lifecycle methods, see the
 * {@link BeanFactory BeanFactory javadocs}.
 *
 * @author Juergen Hoeller
 * @author Chris Beams
 * @since 2.0
 * @see BeanNameAware
 * @see BeanFactoryAware
 * @see InitializingBean
 */
/**
 *允许bean知道bean的回调
 *｛@link ClassLoader类加载器｝；即
 *呈现bean工厂以加载bean类。
 *
 *＜p＞这主要是由框架类实现的
 *必须按名称选择应用程序类，尽管它们可能
 *从共享类加载器加载。
 *
 *＜p＞有关所有bean生命周期方法的列表，请参阅
 *｛@link BeanFactory BeanFactory javadocs｝。
 *
 *@作者Juergen Hoeller
 *@作者Chris Beams
 *@自2.0起
 *@参见BeanNameAware
 *@参见BeanFactory软件
 *@参见InitializingBean
 */
public interface BeanClassLoaderAware extends Aware {

	/**
	 * Callback that supplies the bean {@link ClassLoader class loader} to
	 * a bean instance.
	 * <p>Invoked <i>after</i> the population of normal bean properties but
	 * <i>before</i> an initialization callback such as
	 * {@link InitializingBean InitializingBean's}
	 * {@link InitializingBean#afterPropertiesSet()}
	 * method or a custom init-method.
	 * @param classLoader the owning class loader
	 */
	/**
	 *将bean｛@link ClassLoader类加载器｝提供给
	 *一个bean实例。
	 *<p>在</i>填充正常bean财产后调用<i>，但
	 *＜i＞在＜/i＞初始化回调之前，例如
	 *｛@link InitializingBean InitializingBean's｝
	 *｛@link InitializingBean#afterPropertiesSet（）｝
	 *方法或自定义init方法。
	 *@param classLoader拥有的类加载器
	 */
	void setBeanClassLoader(ClassLoader classLoader);

}
